%{
#include "grammaire.tab.h"
	
%}

DIGIT [0-9]
LETTRE [a-zA-Z_]
ESPA [" "|\t]
%x COMMENTAIRE
%%		

"program"|"PROGRAM" {
	printf("Program\n");
	return PROGRAM;
}

"integer" {
		printf("Integer\n");
		return INTEGER;
}
"boolean" {
		printf("Boolean\n");
		return BOOLEAN;
}
"real" {
		printf("Real\n");
		return REAL;
}
"uses" {
		printf("Uses\n");
		return USES;
}

"var"|"VAR" {
	printf("Var\n");
	return VAR;
}


"procedure" {
	printf("Procedure\n");
	return PROCED;
}

<<<<<<< HEAD
"BEGIN"|"begin" {
	printf("Begin\n");
	return BEGIN_K;
}

"END"|"end" {
	printf("End\n");
	return END_K;
}

=======
>>>>>>> FETCH_HEAD
{LETTRE}({LETTRE}|{DIGIT})* 	{

	printf("Ident\n");
		return IDENT;
}

{ESPA}+ {

	printf("Espace\n");
	return ESPACE ;
}

"(" {
	printf("Parenthèse ouvrante\n");
	return PAR_OUV;
}
")" {
	printf("Parenthèse fermante\n");
	return PAR_FER;
}

"," {
	printf("Virgule\n");
	return VIRG;
}

":" {
	printf("Double point\n");
	return DOUBLE_P;
}

";" {
	printf("Point Virgule\n");
	return PVIRG ;
}

(\n)* {
	printf("Saut\n\n");
	return SAUT;
}
. {
	printf("Non reconnu...");
		return yytext[0];
}
%%
